package com.lory.controller;

import com.lory.pojo.Product;
import com.lory.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName ProductController
 * @Description TODO
 * @Author lory
 * @Date 2021/7/22 15:11
 * @Version TODO
 **/
@RestController
@RequestMapping("/product")
public class ProductController {

    @GetMapping("/list")
    public List<Product> selectProductList(){
        return productService.selectProductList();
    }

    @Autowired
    private ProductService productService;
}
